//
//  GMFRemarkButton.m
//  SplunkMobile
//
//  Created by lijunying on 3/14/2016.
//  Copyright © 2016 Gome. All rights reserved.
//

#import "GMFRemarkButton.h"

@implementation GMFRemarkButton

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        [self setImage:[UIImage imageNamed:@"btn_drawing-zz"] forState:UIControlStateNormal];
        
        self.titleLabel.font = [UIFont systemFontOfSize:11];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self setTitle:@"批注" forState:UIControlStateNormal];
        [self setTitleColor:GMKColor(48, 166, 222) forState:UIControlStateNormal];
        self.titleLabel.font = [UIFont systemFontOfSize:16];
    }
    
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    //    float fltImageViewWidth = 24;
    //    float fltImageViewX = (self.frame.size.width - fltImageViewWidth) * 0.5;
    
    [self.imageView setFrame:CGRectMake(15, 0, fltButtonWidth, fltButtonWidth)];
    [self.titleLabel setFrame:CGRectMake(10, fltButtonWidth + 8, fltButtonWidth + 10, 15)];
}

@end
